from torchsummary import summary
import torch
from torchvision import models

# 初始化模型并移动到设备（假设使用GPU）
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
model = models.resnet50().to(device)

# 输入尺寸为ImageNet标准尺寸 (3, 224, 224)
summary(model, (3, 2240, 2240))